//
//  BaseModel.m
//  NeteaseNews
//
//  Created by dllo on 16/1/15.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "BaseModel.h"

@implementation BaseModel
- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    id m = [[[self class] alloc] initWithDic:dic];
    return m;
}
+(NSMutableArray *)modelHandleWithArray:(NSArray *)arr
{
    NSMutableArray *mArr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        id m = [[self class] modelWithDic:dic];
        [mArr addObject:m];
    }
    return mArr;
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
@end
